<?php

/**
 * 安心站长axzz.cn，一个追求技术创造者。让网站、小程序、APP、应用程序牛起来……
 *
 * cighsen02 365182575
 * 
 * Create at: 2024.05.01
 * Update at: 2025.08.31
 */

namespace Twoir\System\Model;

use Twoir\System\Support\BothTrait;
use Twoir\System\Support\ParseTrait;

/**
 * 公共表 注意表字段未写全，只有现在使用的
 *
 * 【注意事项】有增减字段，请更新 字段：FIELD自定义区和默认值：MYDEFAULT自定义区，没有更新请勿动！！！
 */
class EnewsPublic
{
    use BothTrait, ParseTrait;

    const TABLE = [
        'pri' 	=> 'enewspublic',
        'sec' 	=> 'enewspublicadd',// 副表
    ];

    // 主键
    const PRIMARY = 'id';

    const FIELD = [
        'pri' => [
            // 系统字段
            'id','opendoip','closedoip','doiptype',
            'min_userlen','max_userlen','min_passlen','max_passlen','regretime','regclosewords','regemailonly'

            // 自定义字段

        ],
        'sec' => [
            // 系统字段
            'id',
            'ctimeopen',
            'ctimelast',
            'ctimeindex',
            'ctimeclass',
            'ctimelist',
            'ctimetext',
            'ctimett',
            'ctimetags',
            'ctimegids',
            'ctimecids',
            'ctimernd',
            'ctimeaddre',
            'ctimeqaddre',
            'autodoopen',
            'autodouser',
            'autodopass',
            'autodosalt',
            'autodoshowkey',
            'autodotime',
            'autodoline',
            'autodovar',
            'autodoval',
            'autodoshow',
            'autodofile',
            'autodopostpass',
            'autodoss',
            'autodoaction',
            'autodock',
            'digglevel',
            'diggcmids',
            'toqjf',
            'qtoqjf'
        ],
    ];

    /**
     * 默认值
     */
    const MYDEFAULT = [
        // 主表
        'pri' => [
            // 系统字段
            'id'			=> null,
            'opendoip'		=> '',
            'closedoip'		=> '',
            'doiptype'		=> '',

            'min_userlen'	=> 0,
            'max_userlen'	=> 0,
            'min_passlen'	=> 0,
            'max_passlen'	=> 0,
            'regretime'		=> 0,
            'regclosewords'	=> '',
            'regemailonly'	=> 0

            // 自定义字段

        ],

        // 副表
        'sec' => [
            // 系统字段
            'id'			=> null,
            'ctimeopen'		=> 0,
            'ctimelast'		=> 0,
            'ctimeindex'	=> 0,
            'ctimeclass'	=> 0,
            'ctimelist'		=> 0,
            'ctimetext'		=> 0,
            'ctimett'		=> 0,
            'ctimetags'		=> 0,
            'ctimegids'		=> '',
            'ctimecids'		=> '',
            'ctimernd'		=> '',
            'ctimeaddre'	=> 0,
            'ctimeqaddre'	=> 0,
            'autodoopen'	=> 0,
            'autodouser'	=> '',
            'autodopass'	=> '',
            'autodosalt'	=> '',
            'autodoshowkey'	=> 0,
            'autodotime'	=> 0,
            'autodoline'	=> 0,
            'autodovar'		=> '',
            'autodoval'		=> '',
            'autodoshow'	=> 0,
            'autodofile'	=> 0,
            'autodopostpass'=> '',
            'autodoss'		=> 0,
            'autodoaction'	=> '',
            'autodock'		=> 0,
            'digglevel'		=> 0,
            'diggcmids'		=> '',
            'toqjf'			=> '',
            'qtoqjf'		=> ''
        ]
    ];

    // 执行mysql置后
    protected static $low_priority = false;
}
